import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
//导入过滤器
import './plugins/filter.js'
import axios from 'axios'
//引入全局样式
import './assets/css/gloable.css'
//引入iconfont
import './assets/icon/iconfont.css'




//设置请求统一路径
axios.defaults.baseURL = 'http://192.168.2.60:12400/api/'
// 添加请求拦截器
axios.interceptors.request.use(function(config) {
  //从sessionStorage中后去token
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

// 添加响应拦截器
axios.interceptors.response.use(function(response) {
  return response.data
})
//挂载
Vue.prototype.$http = axios



Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
